clear matrix
clear mata
clear

set maxvar 8000
set scheme plotplain

capture cd  "/Users/Oliver/Dropbox/Shared/Sent-Down/"

use "merged_cfps_replication.dta", replace


***Table 1***
            rdrobust contructed_problem_corruption qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
                est store model511a
            rdrobust contructed_total_problems qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
                est store model512a
            rdrobust contructed_local_gov_achievement qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
                est store model513a
            esttab model511a model512a model513a using $tables/results_attitudes_nocovs.tex, ///
                se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
                title("Effects of Sent-down on Attitudes") ///
                mtitles("Corruption" "Socioeconomic problems" "Local gov. achievement") ///
                varlabels("RD_Estimate" "Sent-down") ///
                cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
                stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
                labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
                nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                        {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                        }} \end{table} \label{tab: 1nocovs} )

***Table 2***
            rdrobust vote qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
                est store model521a
            rdrobust party_member_2010 qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down)  vce(cluster qc602)
                est store model522a
            rdrobust constructed_conflict qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down)  vce(cluster qc602)
                est store model523a
            esttab model521a model522a model523a using $tables/results_participation_nocovs.tex, ///
                se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
                title("Effects of Sent-down on Participation") ///
                mtitles("Local elections voting" "Party membership" "Conflict") ///
                varlabels("RD_Estimate" "Sent-down") ///
                cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
                stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
                labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
                nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                        {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                        }} \end{table} \label{tab: 2nocovs} )

***Table 3***
            rdrobust contructed_stranger_trust qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
                est store model611a
            rdrobust contructed_cadre_trust qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down)  vce(cluster qc602)
                est store model612a
            rdrobust contructed_parent_trust qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down)  vce(cluster qc602)
                est store model613a
            esttab model611a model612a model613a using $tables/mechanisms_trust_nocovs.tex, ///
                se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
                title("Effects of Sent-down on Trust") ///
                mtitles("Strangers" "Cadres" "Parents") ///
                varlabels("RD_Estimate" "Sent-down") ///
                cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
                stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
                labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
                nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                        {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                        }} \end{table} \label{tab: 3nocovs} )
						
***Table D.4***
        rdrobust contructed_problem_corruption qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) covs(gender minority cr_1) vce(cluster qc602)
            est store model511
        rdrobust contructed_total_problems qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) covs(gender minority cr_1) vce(cluster qc602)
            est store model512
        rdrobust contructed_local_gov_achievement qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) covs(gender minority cr_1) vce(cluster qc602)
            est store model513
        esttab model511 model512 model513 using $tables/results_attitudes.tex, ///
            se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Attitudes (With Background Characteristics)") ///
            mtitles("Corruption" "Socioeconomic problems" "Local gov. achievement") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff; gender, ethnic minority, and class background controls. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: 1} )

***Table D.5***
        rdrobust vote qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) covs(gender minority cr_1) vce(cluster qc602)
            est store model521
        rdrobust party_member_2010 qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) covs(gender minority cr_1) vce(cluster qc602)
            est store model522
        rdrobust constructed_conflict qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) covs(gender minority cr_1) vce(cluster qc602)
            est store model523
        esttab model521 model522 model523 using $tables/results_participation.tex, ///
            style(tex) se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Participation (With Background Characteristics)") ///
            mtitles("Local elections voting" "Party membership" "Conflict") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff; gender, ethnic minority, and class background controls. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: 2} )

***Table D.6***
        rdrobust contructed_stranger_trust qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) covs(gender minority cr_1) vce(cluster qc602)
            est store model611
        rdrobust contructed_cadre_trust qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) covs(gender minority cr_1) vce(cluster qc602)
            est store model612
        rdrobust contructed_parent_trust qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) covs(gender minority cr_1) vce(cluster qc602)
            est store model613
        esttab model611 model612 model613 using $tables/mechanisms_trust.tex, ///
            style(tex) se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Trust (With Background Characteristics)") ///
            mtitles("Strangers" "Cadres" "Parents") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff; gender, ethnic minority, and class background controls. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: 3} )



***Table C.1***
        rdrobust edudegree qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store model811
        rdrobust logincome qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store model812
        esttab model811 model812 using $tables/alternative_education.tex, ///
            style(tex) se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Education and Income") ///
            mtitles("Education level" "ln(income)") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: A.6})

***Table C.2***
        rdrobust concern qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store model821
        rdrobust reliability qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store model822
        rdrobust vote_forced qc602 if rdsample==1&qc605==1&vote==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store model823
        esttab model821 model822 model823 using $tables/alternative_desirability.tex, ///
            style(tex) se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Biased Response") ///
            mtitles("Evaluated concern" "Evaluated reliability" "Forced voting") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: A.7} )

***Table C.4***
        rdrobust future_confidence qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store model831
        rdrobust happiness qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store model832
        esttab model831 model832 using $tables/alternative_baselines.tex, ///
            style(tex) se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Baselines") ///
            mtitles("Future confidence" "Experienced happiness") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) ///
            layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: A.8} )

***Table B.2***
            reg contructed_problem_corruption contructed_stranger_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model711
            reg contructed_problem_corruption contructed_cadre_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model712
            reg contructed_problem_corruption contructed_parent_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model713
            esttab model711 model712 model713 using $tables/trust_corruption.tex, ///
                style(tex) label replace se star(* 0.10 ** 0.05 *** 0.01) collabels(none) booktabs width(\linewidth) ///
                stats(fixedbirth fixedprov r2 N, fmt(0 0 2 0) ///
                label("Birth-year FE" "Province FE" "R-squared" "Observations")) ///
                order(contructed_stranger_trust contructed_cadre_trust contructed_parent_trust) ///       
                drop(*.birthyear *.provcd) ///
                title("Trust and Attitudes")  nomtitle ///
                mgroups("Corruption", pattern(1 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}) ) ///
                varlabels("contructed_stranger_trust" "Strangers"  "contructed_cadre_trust" "Cadres"  "contructed_parent_trust" "Parents") ///
                cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
                nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: A.9})        

***Table B.2 (cont'd)***
        *socioeconomic problems on trust
            reg contructed_total_problems contructed_stranger_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model721
            reg contructed_total_problems contructed_cadre_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model722
            reg contructed_total_problems contructed_parent_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model723
            esttab model721 model722 model723 using $tables/trust_problems.tex, ///
                style(tex) label replace se star(* 0.10 ** 0.05 *** 0.01) collabels(none) booktabs width(\linewidth) ///
                stats(fixedbirth fixedprov r2 N, fmt(0 0 2 0) ///
                label("Birth-year FE" "Province FE" "R-squared" "Observations")) ///
                order(contructed_stranger_trust contructed_cadre_trust contructed_parent_trust) ///       
                drop(*.birthyear *.provcd) ///
                title("Trust and Attitudes") nomtitle ///
                mgroups("Socioeconomic problems", pattern(1 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}) ) ///
                varlabels("contructed_stranger_trust" "Strangers"  "contructed_cadre_trust" "Cadres"  "contructed_parent_trust" "Parents") ///
                cells(b(star fmt(a2)) se(par(( )) fmt(a2))) /// 
                nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: A.10} )   

***Table B.2 (cont'd)***
        *local government acievement
            reg contructed_local_gov_achievement contructed_stranger_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model731
            reg contructed_local_gov_achievement contructed_cadre_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model732
            reg contructed_local_gov_achievement contructed_parent_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model733
            esttab model731 model732 model733 using $tables/trust_localgov.tex, ///
                style(tex) label replace se star(* 0.10 ** 0.05 *** 0.01) collabels(none) booktabs width(\linewidth) ///
                stats(fixedbirth fixedprov r2 N, fmt(0 0 2 0) ///
                label("Birth-year FE" "Province FE" "R-squared" "Observations")) ///
                order(contructed_stranger_trust contructed_cadre_trust contructed_parent_trust) ///       
                drop(*.birthyear *.provcd) ///
                title("Trust and Attitudes") nomtitle ///
                mgroups("Local government achievement", pattern(1 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}) ) ///
                varlabels("contructed_stranger_trust" "Strangers"  "contructed_cadre_trust" "Cadres"  "contructed_parent_trust" "Parents") ///
                cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
                nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: A.11} )   

***Table B.3***
        *vote
            reg vote contructed_stranger_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model741
            reg vote contructed_cadre_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model742
            reg vote contructed_parent_trust  i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model743
            esttab model741 model742 model743 using $tables/trust_vote.tex, ///
                style(tex) label replace se star(* 0.10 ** 0.05 *** 0.01) collabels(none) booktabs width(\linewidth) ///
                stats(fixedbirth fixedprov r2 N, fmt(0 0 2 0) ///
                label("Birth-year FE" "Province FE" "R-squared" "Observations")) ///
                order(contructed_stranger_trust contructed_cadre_trust contructed_parent_trust) ///       
                drop(*.birthyear *.provcd) ///
                title("Trust and Participation") nomtitle ///
                mgroups("Local elections voting", pattern(1 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}) ) ///
                varlabels("contructed_stranger_trust" "Strangers"  "contructed_cadre_trust" "Cadres"  "contructed_parent_trust" "Parents") ///
                cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
                nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: A.12} ) 
					
***Table B.3 (cont'd)***
        *party memberhsip
            reg party_member_2010 contructed_stranger_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model751
            reg party_member_2010 contructed_cadre_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model752
            reg party_member_2010 contructed_parent_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model753
            esttab model751 model752 model753 using $tables/trust_membership.tex, ///
                style(tex) label replace se star(* 0.10 ** 0.05 *** 0.01) collabels(none) booktabs width(\linewidth) ///
                stats(fixedbirth fixedprov r2 N, fmt(0 0 2 0) ///
                label("Birth-year FE" "Province FE" "R-squared" "Observations")) ///
                order(contructed_stranger_trust contructed_cadre_trust contructed_parent_trust) ///       
                drop(*.birthyear *.provcd) ///
                title("Trust and Participation") nomtitle ///
                mgroups("Party membership", pattern(1 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}) ) ///
                varlabels("contructed_stranger_trust" "Strangers"  "contructed_cadre_trust" "Cadres"  "contructed_parent_trust" "Parents") ///
                cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
                nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: A.13} ) 
				
***Table B.3 (cont'd)***
        *conflict
            reg constructed_conflict contructed_stranger_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model761
            reg constructed_conflict contructed_cadre_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model762
            reg constructed_conflict contructed_parent_trust i.birthyear i.provcd if rdsample==1&qc605==1,r cluster(qc602)
                *estadd local controls "Yes", replace
                estadd local fixedbirth "Yes", replace
                estadd local fixedprov "Yes", replace
                    est store model763
            esttab model761 model762 model763 using $tables/trust_conflict.tex, ///
                style(tex) label replace se star(* 0.10 ** 0.05 *** 0.01) collabels(none) booktabs width(\linewidth) ///
                stats(fixedbirth fixedprov r2 N, fmt(0 0 2 0) ///
                label("Birth-year FE" "Province FE" "R-squared" "Observations")) ///
                order(contructed_stranger_trust contructed_cadre_trust contructed_parent_trust) ///       
                drop( *.birthyear *.provcd) ///
                title("Trust and Participation") nomtitle ///
                mgroups("Conflict", pattern(1 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}) ) ///
                varlabels("contructed_stranger_trust" "Strangers"  "contructed_cadre_trust" "Cadres"  "contructed_parent_trust" "Parents") ///
                cells(b(star fmt(a2)) se(par(( )) fmt(a2))) /// 
                nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: A.14} ) 

					
*Heterogenous effects

***Table B.5***
    *late leavers
        reg contructed_local_gov_achievement lateleaving i.birthyear i.provcd if rdsample==1&qc605==1, r cluster(qc602)
            *estadd local controls "Yes", replace
            estadd local fixedbirth "Yes", replace
            estadd local fixedprov "Yes", replace
                est store model901
        esttab model901 using $tables/ols_diffattitudes.tex, ///
            style(tex) label replace se star(* 0.10 ** 0.05 *** 0.01) collabels(none) booktabs width(0.6\linewidth) ///
            stats(fixedbirth fixedprov r2 N, fmt(0 0 2 0) ///
            label("Birth-year FE" "Province FE" "R-squared" "Observations")) ///  
            drop(_cons *.birthyear *.provcd) ///
            title("Attitudes Among the Sent-down") nomtitle ///
            mgroups("Local gov. achievement", pattern(1 0 ) span prefix(\multicolumn{@span}{c}{) suffix(}) ) ///
            varlabels(lateleaving "Late return") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                {\footnotesize Note: Standard errors in parenthesis are clustered at the graduation-year level. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                }} \end{table} \label{tab: A.15} ) 

***Table C.3***				
*nonresponse
    rdrobust noresponse_corruption qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
        est store nores1
    rdrobust noresponse_problems qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
        est store nores2
    rdrobust noresponse_localgov qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
        est store nores3
    rdrobust noresponse_vote qc602 if rdsample==1&qc605==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
        est store nores4
    esttab nores1 nores3 nores4 using $tables/noresponse.tex, ///
        se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
        title("Likelihood of No Response") ///
        mtitles("Corruption" "Local gov. achievement" "Local elections voting") ///
        varlabels("RD_Estimate" "Sent-down") ///
        cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
        stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
        labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
        nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                }} \end{table} \label{tab: noresponse} )

***Table D.12***
*high education level
    *attitudes
        rdrobust contructed_problem_corruption qc602 if rdsample==1&qc605==1&high_edudegree==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store edu511
        rdrobust contructed_total_problems qc602 if rdsample==1&qc605==1&high_edudegree==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store edu512
        rdrobust contructed_local_gov_achievement qc602 if rdsample==1&qc605==1&high_edudegree==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store edu513
        esttab edu511 edu512 edu513 using $tables/results_attitudes_edu.tex, ///
            se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Attitudes (High School and Above)") ///
            mtitles("Corruption" "Socioeconomic problems" "Local gov. achievement") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff; gender, ethnic minority, and class background controls. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: 1edu} )

***Table D.13***
    *participation
        rdrobust vote qc602 if rdsample==1&qc605==1&high_edudegree==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store edu521
        rdrobust party_member_2010 qc602 if rdsample==1&qc605==1&high_edudegree==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store edu522
        rdrobust constructed_conflict qc602 if rdsample==1&qc605==1&high_edudegree==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store edu523
        esttab edu521 edu522 edu523 using $tables/results_participation_edu.tex, ///
            style(tex) se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Participation (High School and Above)") ///
            mtitles("Local elections voting" "Party membership" "Conflict") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: 2edu} )

***Table D.14***					
*high income
        *attitudes
        rdrobust contructed_problem_corruption qc602 if rdsample==1&qc605==1&high_income==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store income511
        rdrobust contructed_total_problems qc602 if rdsample==1&qc605==1&high_income==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store income512
        rdrobust contructed_local_gov_achievement qc602 if rdsample==1&qc605==1&high_income==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store income513
        esttab edu511 income512 income513 using $tables/results_attitudes_income.tex, ///
            se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Attitudes (Above Median Income)") ///
            mtitles("Corruption" "Socioeconomic problems" "Local gov. achievement") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: 1income} )

***Table D.15***
    *participation
        rdrobust vote qc602 if rdsample==1&qc605==1&high_income==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store income521
        rdrobust party_member_2010 qc602 if rdsample==1&qc605==1&high_income==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store income522
        rdrobust constructed_conflict qc602 if rdsample==1&qc605==1&high_income==1, c(1978.5) fuzzy(sent_down) vce(cluster qc602)
            est store income523
        esttab income521 income522 income523 using $tables/results_participation_income.tex, ///
            style(tex) se star(* 0.10 ** 0.05 *** 0.01) label replace collabels(none) booktabs width(\linewidth) ///
            title("Effects of Sent-down on Participation (Above Median Income)") ///
            mtitles("Local elections voting" "Party membership" "Conflict") ///
            varlabels("RD_Estimate" "Sent-down") ///
            cells(b(star fmt(a2)) se(par(( )) fmt(a2))) ///
            stats(h_l N_h_l N_h_r N, fmt(1 0 0) layout(@ `""@/@""' @) ///
            labels(`"Bandwidth"' `"Effective obs. left/right"' `"Observations"')) ///
            nonotes postfoot( \bottomrule \end{tabular*} \caption*{ ///
                    {\footnotesize Note: Standard errors in parentheses are clustered at the graduation-year level. All RD estimations use: local linear regressions, triangular kernels, and MSE-optimal bandwidth on both sides of the cutoff. \sym{*} \(p<0.1\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). ///
                    }} \end{table} \label{tab: 2income} )


   